import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/4 22:01
 * @description 暴力，双重循环
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int numOfPairs(String[] nums, String target) {
        int ans = 0, n = nums.length;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (i != j && target.equals(nums[i] + nums[j])) {
                    ans++;
                }
            }
        }
        return ans;
    }
}
